<template>
  <div>
    <van-icon name="arrow-left" @click="back" class="iconBack" />
    <div style="height: 40px"></div>
    <van-cell-group inset class="content">
      <h1 class="detailTitle">{{ detailList.title }}</h1>
      <div style="height: 20px"></div>
      <p>{{ detailList.createTime }}</p>
      <div style="height: 30px"></div>
      <div class="detailContent">
        {{ detailList.content }}
      </div>
    </van-cell-group>
  </div>
</template>

<script>
import { DetailFeedbackApi } from "@/service/metro/metroservice.js";
export default {
  data() {
    return {
      detailId: "",
      detailList: "",
    };
  },
  async created() {
    this.detailId = this.$route.query.id;
    let token = window.localStorage.getItem("token");
    if (token) {
      let { data } = await DetailFeedbackApi(this.detailId);
      this.detailList = data.data;
      console.log(this.detailList);
    }
  },
  methods: {
     back() {
      this.$router.go(-1);
    },
  },
};
</script>

<style scoped>
.iconBack {
  position: absolute;
  left: 5px;
  top: 10px;
  font-size: 16px;
}
.content {
  background-color: rgb(231, 236, 184);
  height: 650px;
}
.detailTitle {
  font-size: 20px;
}
.detailContent {
  font-size: 16px;
}
</style>